package com.fitzone.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fitzone.model.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("user")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableField("openid")
    private String openid;

    @TableField("avatar")
    private String avatar;

    @TableField("name")
    private String name;

    @TableField("sex")
    private Integer sex;

    @TableField("phone")
    private String phone;

    @TableField("id_card")
    private String idCard;

    @TableField("vip")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime vip;
}
